import request from '@/utils/request'

/* 获取区域列表的接口 */
export const fetchAreaListAPI = (pageParams) => {
  return request({
    url: '/parking/area/list',
    params: pageParams,
    method: 'GET'
  })
}

/* 添加区域的接口 */
export const addAreaAPI = (data) => {
  return request({
    url: '/parking/area',
    method: 'POST',
    data
  })
}

/* 编辑区域的接口 */
export const updateAreaAPI = (data) => {
  return request({
    url: '/parking/area',
    method: 'PUT',
    data
  })
}

/* 删除区域的接口 */
export const deleteAreaAPI = (id) => {
  return request({
    url: `/parking/area/${id}`,
    method: 'DELETE'
  })
}

/* 获取关联计费规则的接口 */
export const fetchRuleListAPI = () => {
  return request({
    url: '/parking/rule/list',
    method: 'GET'
  })
}
